using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace TidhiGanitam.DataModel
{
    public class YogamuDetails
    {
        Enums.TidhiState m_YogamuState;
        double m_Yogamu;
        DateTime m_EndDate;
        Rasi m_EndTime;

        public Enums.TidhiState YogamuState
        {
            get
            { return m_YogamuState; }
            set
            { m_YogamuState = value; }
        }
        public double YogamuIndex
        {
            get
            { return m_Yogamu; }
            set
            { m_Yogamu = value; }
        }
        public string Yogamu
        {
            get
            { return Constants.Yogamu[Convert.ToInt32(YogamuIndex)].ToString();}
        }
        public DateTime EndDate
        {
            get
            { return m_EndDate; }
            set
            {
                m_EndDate = value;
            }
        }
        public Rasi EndTime
        {
            get
            { return m_EndTime; }
            set
            { m_EndTime = value; }
        }
        public YogamuDetails(double YogamuIndex, Enums.TidhiState YogamuState, DateTime EndDate, Rasi EndTime)
        {
            m_Yogamu = YogamuIndex;
            m_YogamuState = YogamuState;
            m_EndDate = EndDate;
            m_EndTime = EndTime;
        }
        public string GetYogamuDetailsString(Rasi Suryodayamu)
        {
            string YogamuString = Yogamu;
            if (YogamuState == Enums.TidhiState.Eshyam)
            {
                YogamuString = "Eshya(" + Yogamu + ")";
            }
            else if (YogamuState == Enums.TidhiState.Purti)
            {
                YogamuString = Yogamu + " Purti";
            }
            string retString = string.Format("{0} {1}", YogamuString, EndTime.DisplayFormat(Enums.DisplayFormat.LV));
            return retString;
        }

    }
}
